.class Lcom/instagram/android/nux/af;
.super Ljava/lang/Object;
.source "LandingPageFragment.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field final synthetic a:Landroid/app/Dialog;

.field final synthetic b:Lcom/instagram/android/nux/ad;


# direct methods
.method constructor <init>(Lcom/instagram/android/nux/ad;Landroid/app/Dialog;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 218
    iput-object p1, p0, Lcom/instagram/android/nux/af;->b:Lcom/instagram/android/nux/ad;

    iput-object p2, p0, Lcom/instagram/android/nux/af;->a:Landroid/app/Dialog;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 6
    .parameter "v"

    .prologue
    const/4 v4, 0x1

    const/4 v5, 0x0

    .line 221
    invoke-static {}, Lcom/instagram/m/a/a;->a()Lcom/instagram/m/a/a;

    move-result-object v1

    .line 222
    iget-object v0, p0, Lcom/instagram/android/nux/af;->a:Landroid/app/Dialog;

    sget v2, Lcom/facebook/aw;->dev_server:I

    invoke-virtual {v0, v2}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    .line 223
    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    sget-object v3, Ljava/util/Locale;->US:Ljava/util/Locale;

    invoke-virtual {v2, v3}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v2

    .line 225
    invoke-static {v2}, Lcom/instagram/n/i;->a(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 226
    invoke-virtual {v1, v5}, Lcom/instagram/m/a/a;->a(Z)V

    .line 239
    :goto_0
    iget-object v2, p0, Lcom/instagram/android/nux/af;->b:Lcom/instagram/android/nux/ad;

    iget-object v2, v2, Lcom/instagram/android/nux/ad;->a:Lcom/instagram/android/nux/v;

    invoke-virtual {v2}, Lcom/instagram/android/nux/v;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2, v0}, Lcom/instagram/n/k;->a(Landroid/content/Context;Landroid/view/View;)V

    .line 241
    iget-object v0, p0, Lcom/instagram/android/nux/af;->b:Lcom/instagram/android/nux/ad;

    iget-object v2, v0, Lcom/instagram/android/nux/ad;->a:Lcom/instagram/android/nux/v;

    sget v3, Lcom/facebook/ba;->dev_host_set_to:I

    new-array v4, v4, [Ljava/lang/Object;

    invoke-virtual {v1}, Lcom/instagram/m/a/a;->b()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-virtual {v1}, Lcom/instagram/m/a/a;->c()Ljava/lang/String;

    move-result-object v0

    :goto_1
    aput-object v0, v4, v5

    invoke-virtual {v2, v3, v4}, Lcom/instagram/android/nux/v;->a(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 247
    invoke-static {v0}, Lcom/instagram/n/j;->a(Ljava/lang/CharSequence;)V

    .line 249
    iget-object v0, p0, Lcom/instagram/android/nux/af;->a:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V

    .line 250
    return-void

    .line 228
    :cond_0
    invoke-virtual {v1, v4}, Lcom/instagram/m/a/a;->a(Z)V

    .line 230
    const-string v3, "preprod"

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 231
    const-string v2, "preprod.instagram.com"

    invoke-virtual {v1, v2}, Lcom/instagram/m/a/a;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 232
    :cond_1
    const-string v3, "."

    invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 233
    invoke-virtual {v1, v2}, Lcom/instagram/m/a/a;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 235
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ".sb.instagram.com"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/instagram/m/a/a;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 241
    :cond_3
    const-string v0, "instagram.com"

    goto :goto_1
.end method
